package org.mozhu.learning.algo.linked_list.single;

public class SNode<E> {
    private SNode<E> next;
    private E data;

    public SNode() {
    }

    public SNode(E data) {
        this.data = data;
    }

    public SNode(SNode<E> next, E data) {
        this.data = data;
        this.next = next;
    }

    public SNode<E> getNext() {
        return next;
    }

    public E getData() {
        return data;
    }

    public void setNext(SNode<E> next) {
        this.next = next;
    }

    public void setData(E data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "SNode{" +
                "next=" + next +
                ", data=" + data +
                '}';
    }
}
